package com.ys.enume.finance;

//财务交易流水
public class TcwFinancialTransactionFlowEnum {
    //来源表单类型
    public enum FromType {
        TCW_RoleCostApplyItem("职能费用申请单子表", 0),
        TCW_PaymentApplyItem("付款申请单子表", 1),
        TCW_CapitalRegisterSon("资金登记单子表", 2),
        TB_PayrollSlipItem("工资付款单子表", 3),
        TB_MedicarePayItem("医保付款单子表", 4),
        TB_SocialSecurityPayItem("社保付款单子表", 5),
        TB_ReservedPayItem("公积金付款单子表", 6),
        TB_IncomePayItem("个税付款单子表", 7),
        TCW_AdvanceAccountRecharge("预支账户充值单", 8),
        TCW_AdvanceAccountReimbursementItem("预支账户报销单", 9),
        TCW_AdvanceAccountBack("预支账户归还单", 10),
        TCW_NeedPayAccountPayItem("应付账户支付列表", 11),
        TCW_CompanyAccountTransferItem("公司账户资金转账", 12),
        TCW_EntryApplyItem("入账申请单子表", 13),
        TCG_PurchaseOrderPay("采购付款", 14),
        TCC_OnlinePurchaseReturn("线上采购退货", 15),
        TCC_LogisticsPaymentTariff("物流付款单（关税费）", 16),
        TCC_LogisticsPaymentFee("物流付款单（物流费）", 17),
        TP_FbaLogisticsPayment("物流付款单(1.0使用,后期1.5弃用)", 250),
        ;
        public String name;
        public Integer value;

        private FromType(String name, Integer value) {
            this.name = name;
            this.value = value;
        }

        public static String getName(int value) {
            for (FromType e : FromType.values()) {
                if (e.value == value) {
                    return e.name;
                }
            }

            return "";
        }

        public static Integer getValue(String name) {
            for (FromType e : FromType.values()) {
                if (e.name.equals(name)) {
                    return e.value;
                }
            }
            return null;
        }
    }
}
